import java.util.Scanner;

public class deletepubliczifuchuan {//https://www.nowcoder.com/practice/f0db4c36573d459cae44ac90b90c6212?tpId=182&tqId=34789&ru=/exam/oj
    public static String deletepubliczifuchuan(String s1,String s2) {
        StringBuilder temp=new StringBuilder();//这个使用StringBuilder,方便字符串随时可以修改
        for(int i=0;i<s1.length();i++){
            char ch=s1.charAt(i);//ch是字符类型
            if(!s2.contains(ch+"")){//因为contains(字符串),技巧：ch+“”可以变为字符串
                temp.append(ch);
            }
        }
        return temp.toString();//因为StringBuilder不是String

    }
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        while(in.hasNextLine()){
            String str1=in.nextLine();
            String str2=in.nextLine();
            String ret=deletepubliczifuchuan(str1,str2);
            System.out.println(ret);
        }
    }
}
